# encoding=utf8

from flask import Blueprint
from app.forms.device import DeviceForm

device = Blueprint('device', __name__)


@device.route('upload', methods=['POST'])
def upload():
    form = DeviceForm()
    if form.on_valid_value():
        if form.update_ip():
            return "ok"
    return "fail"
